package main

func main()  {
	
}

type liannode struct {
	val int
	next *liannode
}

func fanzhuan(head *liannode)  {
	if head == nil || head.next == nil {
		return
	}
	cur := head.next
	for cur != nil || cur.next != nil {
		tmp := cur.next.next
		cur.next.next = cur
		tmp.next = cur.next
		cur = cur.next.next
	}
	head.next = cur
}